{% extends "base.html" %}

{% block title %}{{ block.super }} - Season{% endblock %}
{% block head %}{{ block.super }}
<style>
<!--
body {
    margin: 0;
}

h1 {
    margin-top: 0px;
}

#content {
    height: 600px;
    margin: auto;
    position: relative;
    width: 800px;
    text-align:center;
}

.serie_div {
    padding-top: 10px;
    height: 290px;
    position: absolute;
    width: 370px;
    border: thin dotted;
    border-color: #001100;
}

#serie_a {
}

#serie_b {
    left: 400px;
}

#serie_c {
    top: 310px;
}

#serie_d {
    left: 400px;
    top: 310px;
}

#season_footer {
    width: 100%;
    text-align: center;
    position: absolute;
    top: 630px;
}

table {
    margin: 0 auto;
}

table, th, td {
    border: 1px solid grey; 
}

tr.team {
    width: 150px;
}
-->
</style>
{% endblock %}
{% block contents %}
<div id="content">
	<div id="serie_a" class="serie_div">
	    <h1 align="center">PRIMEIRA DIVIS&Atilde;O</h1>
		<table>
		<tr>
		    <th>CLASSIFICA&Ccedil;&Atilde;O</th>
		    <th>P</th>
		    <th>V</th>
		    <th>E</th>
		    <th>D</th>
		    <th>GP</th>
		    <th>GS</th>
		    <th>SG</th>
		<tr>
		
		{% for t in teams_serie_a %}
		<tr class="team" style="border-color:#{{t.base_team.color3}}; background-color:#{{t.base_team.color1}}; text-align: left;">
		    <td style="color:#{{t.base_team.color2}}; font-weight: bold;">{{t.base_team.name}}{% ifequal t.pk my_team.pk %} ***{% endifequal %}</td>
		    <td align="center"><font color={{t.base_team.color2}}>{{t.points}}</font></td>
		    <td align="center"><font color={{t.base_team.color2}}>{{t.wins}}</font></td>
		    <td align="center"><font color={{t.base_team.color2}}>{{t.draws}}</font></td>
		    <td align="center"><font color={{t.base_team.color2}}>{{t.loses}}</font></td>
		    <td align="center"><font color={{t.base_team.color2}}>{{t.goals_for}}</font></td>
		    <td align="center"><font color={{t.base_team.color2}}>{{t.goals_against}}</font></td>
		    <td align="center"><font color={{t.base_team.color2}}>{{t.get_goal_difference}}</font></td>
		</tr>
		{% endfor %}
		</table>
	</div>
	
	<div id="serie_b" class="serie_div">
	    <h1 align="center">SEGUNDA DIVIS&Atilde;O</h1>
	    <table>
	    <tr>
	        <th>CLASSIFICA&Ccedil;&Atilde;O</th>
	        <th>P</th>
	        <th>V</th>
	        <th>E</th>
	        <th>D</th>
	        <th>GP</th>
	        <th>GS</th>
	        <th>SG</th>
	    <tr>
	    
	    {% for t in teams_serie_b %}
	    <tr class="team" style="border-color:#{{t.base_team.color3}}; background-color:#{{t.base_team.color1}}; text-align: left;">
	        <td style="color:#{{t.base_team.color2}}; font-weight: bold;">{{t.base_team.name}}{% ifequal t.pk my_team.pk %} ***{% endifequal %}</td>
	        <td align="center"><font color={{t.base_team.color2}}>{{t.points}}</font></td>
	        <td align="center"><font color={{t.base_team.color2}}>{{t.wins}}</font></td>
	        <td align="center"><font color={{t.base_team.color2}}>{{t.draws}}</font></td>
	        <td align="center"><font color={{t.base_team.color2}}>{{t.loses}}</font></td>
	        <td align="center"><font color={{t.base_team.color2}}>{{t.goals_for}}</font></td>
	        <td align="center"><font color={{t.base_team.color2}}>{{t.goals_against}}</font></td>
	        <td align="center"><font color={{t.base_team.color2}}>{{t.get_goal_difference}}</font></td>
	    </tr>
	    {% endfor %}
	    </table>
	</div>
	
	<div id="serie_c" class="serie_div">
	    <h1 align="center">TERCEIRA DIVIS&Atilde;O</h1>
	    <table>
	    <tr>
	        <th>CLASSIFICA&Ccedil;&Atilde;O</th>
	        <th>P</th>
	        <th>V</th>
	        <th>E</th>
	        <th>D</th>
	        <th>GP</th>
	        <th>GS</th>
	        <th>SG</th>
	    <tr>
	    
	    {% for t in teams_serie_c %}
	    <tr class="team" style="border-color:#{{t.base_team.color3}}; background-color:#{{t.base_team.color1}}; text-align: left;">
	        <td style="color:#{{t.base_team.color2}}; font-weight: bold;">{{t.base_team.name}}{% ifequal t.pk my_team.pk %} ***{% endifequal %}</td>
	        <td align="center"><font color={{t.base_team.color2}}>{{t.points}}</font></td>
	        <td align="center"><font color={{t.base_team.color2}}>{{t.wins}}</font></td>
	        <td align="center"><font color={{t.base_team.color2}}>{{t.draws}}</font></td>
	        <td align="center"><font color={{t.base_team.color2}}>{{t.loses}}</font></td>
	        <td align="center"><font color={{t.base_team.color2}}>{{t.goals_for}}</font></td>
	        <td align="center"><font color={{t.base_team.color2}}>{{t.goals_against}}</font></td>
	        <td align="center"><font color={{t.base_team.color2}}>{{t.get_goal_difference}}</font></td>
	    </tr>
	    {% endfor %}
	    </table>
	</div>
	
	<div id="serie_d" class="serie_div">
	    <h1 align="center">QUARTA DIVIS&Atilde;O</h1>
	    <table>
	    <tr>
	        <th>CLASSIFICA&Ccedil;&Atilde;O</th>
	        <th>P</th>
	        <th>V</th>
	        <th>E</th>
	        <th>D</th>
	        <th>GP</th>
	        <th>GS</th>
	        <th>SG</th>
	    <tr>
	    
	    {% for t in teams_serie_d %}
	    <tr class="team" style="border-color:#{{t.base_team.color3}}; background-color:#{{t.base_team.color1}}; text-align: left;">
	        <td style="color:#{{t.base_team.color2}}; font-weight: bold;">{{t.base_team.name}}{% ifequal t.pk my_team.pk %} ***{% endifequal %}</td>
	        <td align="center"><font color={{t.base_team.color2}}>{{t.points}}</font></td>
	        <td align="center"><font color={{t.base_team.color2}}>{{t.wins}}</font></td>
	        <td align="center"><font color={{t.base_team.color2}}>{{t.draws}}</font></td>
	        <td align="center"><font color={{t.base_team.color2}}>{{t.loses}}</font></td>
	        <td align="center"><font color={{t.base_team.color2}}>{{t.goals_for}}</font></td>
	        <td align="center"><font color={{t.base_team.color2}}>{{t.goals_against}}</font></td>
	        <td align="center"><font color={{t.base_team.color2}}>{{t.get_goal_difference}}</font></td>
	    </tr>
	    {% endfor %}
	    </table>
	</div>
	<div id="season_footer">
		{% if season.completed %}
		   <a href="/game/create_season">Nova Temporada</a>
		{% else %}
		   <a href="/game/play_round">Jogar Rodada</a><!--| <a href="/game/manage_team">Gerenciar Time</a>-->
		{% endif %}
	</div>
</div>
{% if debug %} {{ relatorio }} {%endif %}
{% endblock contents %}